SLES 12
Sponsored Link

Basic Authentication
2015/11/23
 
Set Basic Authentication and limit squid for users to require authentication.
[1] Install a package which includes htpasswd.
prox:~ #
zypper -n install apache2-utils
[2] Configure Squid to set Basic Auth.
prox:~ #
vi /etc/squid/squid.conf
acl CONNECT method CONNECT
# line 26: add follows for Basic Auth

auth_param basic program /usr/sbin/basic_ncsa_auth /etc/squid/.htpasswd
auth_param basic children 5
auth_param basic realm Squid Basic Authentication
auth_param basic credentialsttl 5 hours
acl password proxy_auth REQUIRED
http_access allow password
# add a user : create a new file with "-c" ( add the "-c" option only for the initial registration )

prox:~ #
htpasswd2 -c /etc/squid/.htpasswd suse

New password:    
# set password

Re-type new password:
Adding password for user suse
prox:~ #
systemctl restart squid

Proxy Clients' Settings : SUSE
[3] Configure SUSE Proxy Client for Basic Auth.
client:~ #
vi /etc/sysconfig/proxy
# line 11: change

PROXY_ENABLED="
yes
"
# line 19: set HTTP proxy

HTTP_PROXY="
http://suse:password@prox.srv.world:3128/
"
# line 27: set HTTPS proxy

HTTPS_PROXY="
http://suse:password@prox.srv.world:3128/
"
# line 34: set FTP proxy

FTP_PROXY="
http://suse:password@prox.srv.world:3128/
"
Proxy Clients' Settings : Windows
[4] For Windows Clients, none of specific settings, but when access to a web, proxy server requires authentication like follows, then input username and password.
 
Tweet